package com.study.myupdate.model;

import com.study.myupdate.util.HttpUtil;

/**
 * 更新M层
 */
public class UpdateModel {
    /**
     * 获取服务器上APK版本号
     */
    public void getServiceVersion(String url, final UpdateModelCallBack callBack) {

        HttpUtil.build().url(url).simpleCallBack(new HttpUtil.NetWorkCallBack() {
            @Override
            public void onFailure(String msg) {
                callBack.onFailure(msg);
            }

            @Override
            public void onSuccess(String content) {
                callBack.onSuccess(content);
            }
        });
    }

    public interface UpdateModelCallBack {
        void onFailure(String msg);

        void onSuccess(String content);
    }
}
